package com.itheima.pojo;

import java.sql.Date;

/**
 * @author by itheima
 * @Date 2021/8/20
 * @Description 定义user表对应的实体类
 * 实体类中属性名称与table中字段名称一样，那么mybatis自动映射
 *  就是表中的数据自动填充到与对应字段形同的属性下
 */
public class User {
    private Integer id;
    private String username;
    /**
     * 数据库中类型是date对应java中util下Date也可以是sql下的Date
     */
    private Date birthday;
    private String sex;
    private String address;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", birthday=" + birthday +
                ", sex='" + sex + '\'' +
                ", address='" + address + '\'' +
                '}';
    }
}
